package cn.bdqn.service;


import cn.bdqn.sys.model.Enterprise;
import cn.bdqn.sys.model.User;
import cn.bdqn.util.ServletUtil;
import cn.bdqn.util.SessionUtil;
import cn.bdqn.util.ShiroUtils;
import org.apache.shiro.session.Session;

/**
 * @author Li Ruihuan
 * @create 2019-06-26 9:17
 */
public class BaseService {

    public User getUser(){
        return SessionUtil.getUser(ServletUtil.getSession());
    }
    public Enterprise getEnterprise(){
        return  SessionUtil.getEnterprise(ServletUtil.getSession());
    }
    public Integer getUserid(){
        return SessionUtil.getUserId(ServletUtil.getSession());
    }
    public Integer getEid() {
        return SessionUtil.getEId(ServletUtil.getSession());
    }
//    public HttpSession getSession(){
//        return ServletUtil.getSession();
//    }
    public Session getSession(){
        return ShiroUtils.getSession();
    }
}
